package com.rightsidetech.trade.dtos.request.integral;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.io.Serializable;

@Data
public class LogisticsOrderNoReq implements Serializable {

    @ApiModelProperty(value = "id",required = true)
    @NotNull(message = "id不可为空")
    private Long id;

    @ApiModelProperty(value = "快递单号",required = true)
    @Pattern(regexp = "[a-zA-Z0-9]{0,}",message = "快递单号只支持字母数字")
    @NotBlank(message = "快递单号不可为空")
    @Length(max = 30,message = "物流单号过长")
    private String logisticsOrderNo;
}
